//
//  XQOrderDetailTopUpOrDownView.swift
//  Spark Peso
//
//  Created by 小琦 on 2025/2/4.
//

import UIKit

class XQOrderDetailTopUpOrDownView: UIView {
    
    private lazy var topLb : UILabel = {
        let lb = UILabel()
        lb.textColor = .white
        lb.font = UIFont.systemFont(ofSize: 12)
        lb.textAlignment = .left
        return lb
    }()
    
    private lazy var bottomLb : UILabel = {
        let lb = UILabel()
        lb.textColor = .white
        lb.font = UIFont.systemFont(ofSize: 16,weight: .medium)
        lb.textAlignment = .left
        return lb
    }()
    
    var top : String? = "" {
        didSet {
            topLb.text = top
        }
    }
    
    var bottom : String? = "" {
        didSet {
            bottomLb.text = bottom
        }
    }

    override init(frame: CGRect) {
        super.init(frame: frame)
        self.isUserInteractionEnabled = true
        makeUI()
        makeConstraints()
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
        makeUI()
        makeConstraints()
    }
    
    private func makeUI() {
        self.addSubview(self.topLb)
        self.addSubview(self.bottomLb)
    }
    
    private func makeConstraints() {
        self.topLb.snp.makeConstraints { make in
            make.top.left.equalTo(0)
            make.height.equalTo(17)
            make.right.equalTo(0)
        }
        self.bottomLb.snp.makeConstraints { make in
            make.top.equalTo(self.topLb.snp.bottom).offset(4)
            make.left.equalTo(0)
            make.height.equalTo(22)
            make.bottom.right.equalTo(0)
        }
    }
    
}
